package 设计模式.d_原型模式;

/**
 * @author caihe
 * @date 2023/3/9 15:05
 */
public class FactoryImpl implements Factory {
    
    private Coin coin;
    private Star star;

    public FactoryImpl(Coin coin, Star star) {
        this.coin = coin;
        this.star = star;
    }

    @Override
    public Coin copyCoin() {
        return coin.copy();
    }

    @Override
    public Star copyStar() {
        return star.copy();
    }
}
